package com.tang.dao;

import com.tang.pojo.Books;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface BookMapper {
    //增加一本书
    int addBook(Books books);
    //删除一本书
    int deleteBookById(@Param("bookId") int id);
    //更新一本书
    int updateBook(Books books);
    //查询一本书
    Books queryBookBookById(int id);
    //查询全部的书
//    @Select("select * from books")
    List<Books> queryAllBook();
    //模糊查询
    List<Books> queryBookByName(String bookName);
}
